package com.aaa.web.controller.userapprovecontroller;

import com.aaa.entity.AppIdcardApprove;
import com.aaa.entity.AppUserinfo;
import com.aaa.web.commons.Query;
import com.aaa.web.commons.Result;
import com.aaa.web.service.isocialapproveservice.ISocialUserApproveService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;
/**
* @description: 社会后台管理Controller
* @author: 王林林
* @create: 2018/12/26 8:57
**/

@Controller
@RequestMapping("/socialuserapprove")
public class SocialUserApproveController {

    @Autowired
    private ISocialUserApproveService service;
    /**点击社会用户跳转至socialapprove.html网页*/
    @RequestMapping("/getAllSocialUserPage")
    public String getAllNoticePage(){

        return "views/webhtml/approve/socialapprove";
    }

    /**点击社会用户认证跳转至socialuserapprove.html*/
    @RequestMapping("/approveSocialUserPage")
    public String approveSocialUserPage(){

        return "views/webhtml/approve/socialuserapprove";
    }

    /**获取所有社会用户或根据手机号查询社会用户*/
    @RequestMapping("/getAllSocialUser")
    @ResponseBody
    public Map getAllNotice(Query query, AppUserinfo appUserinfo) {
        Map m = service.getAllSocialUser(query,appUserinfo);
        return m;
    }


    /**获取所有提交认证的社会用户*/
    @RequestMapping("/getAllSocialUserWhichApprove")
    @ResponseBody
    public Map getAllSocialUserWhichApprove(Query query, AppIdcardApprove idcardApprove) {
        Map m = service.getAllSocialUserWhichApprove(query,idcardApprove);
        return m;
    }


    /**根据手机号更改通过认证的社会用户信息*/
    @RequestMapping("/socialapprovePass")
    @ResponseBody
    public Result socialapprovePass(String telephone) {
         return service.socialapprovePass(telephone);
    }

    /**根据手机号取消认证的社会用户信息*/
    @RequestMapping("/delSocialapprove")
    @ResponseBody
    public Result delSocialapprove(String telephone) {
        return service.delSocialapprove(telephone);
    }




}
